package com.ccb.sc.common.modules.setting.vo;

import com.ccb.sc.common.bind.annotation.Mapping;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author ken
 * @version 1.0
 * @date 2020-09-23
 */
@ApiModel
public class SignInSettingsVo implements Serializable {

    /**
     * 签到第一天奖励
     */
    @ApiModelProperty("签到每天奖励")
    @NotNull
    @Mapping(value = "signIn.reward.everyday")
    private int rewardEveryday;

    /**
     * 签到第二天
     */
    @ApiModelProperty("当月签到累计7天奖励")
    @NotNull
    @Mapping(value = "signIn.reward.sevenDays")
    private int rewardSevenDays;

    /**
     * 签到第三天
     */
    @ApiModelProperty("当月签到累计17天奖励")
    @NotNull
    @Mapping(value = "signIn.reward.seventeenDays")
    private int rewardSeventeenDays;

    /**
     * 签到第四天
     */
    @ApiModelProperty("当月签到累计27天奖励")
    @NotNull
    @Mapping(value = "signIn.reward.twentySevenDays")
    private int rewardTwentySevenDays;

    public int getRewardEveryday() {
        return rewardEveryday;
    }

    public void setRewardEveryday(int rewardEveryday) {
        this.rewardEveryday = rewardEveryday;
    }

    public int getRewardSevenDays() {
        return rewardSevenDays;
    }

    public void setRewardSevenDays(int rewardSevenDays) {
        this.rewardSevenDays = rewardSevenDays;
    }

    public int getRewardSeventeenDays() {
        return rewardSeventeenDays;
    }

    public void setRewardSeventeenDays(int rewardSeventeenDays) {
        this.rewardSeventeenDays = rewardSeventeenDays;
    }

    public int getRewardTwentySevenDays() {
        return rewardTwentySevenDays;
    }

    public void setRewardTwentySevenDays(int rewardTwentySevenDays) {
        this.rewardTwentySevenDays = rewardTwentySevenDays;
    }

    public int getByContinueDays(int continueDays) {
        if (continueDays == 7) {
            return getRewardSevenDays();
        }
        if (continueDays == 17) {
            return getRewardSeventeenDays();
        }
        if (continueDays == 27) {
            return getRewardTwentySevenDays();
        }
        return 0;
    }
}
